﻿using DAO_ADMIN;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PTTK19.GUI
{
    public partial class ThemMonAnFrm : Form
    {
        public ThemMonAnFrm()
        {
            InitializeComponent();
        }

        private void btnThoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnThem_Click(object sender, EventArgs e)
        {
            string _TenMonAn = txtTenMonAn.Text;
            string _CachCheBien = txtCachCheBien.Text;
            List<SqlParameter> parr = new List<SqlParameter>();
            string procname = "sp_ThemMonAn";
            parr.Add(new SqlParameter("@TenMonAn", _TenMonAn));
            parr.Add(new SqlParameter("@CachCheBien", _CachCheBien));
            DataProvider.NonqueryProc(procname, parr);
            MessageBox.Show("Thêm mới thành công", "Thông báo");
        }
    }
}
